﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
namespace Gatheshop.BLL
{
     public partial class gift_card
    {
        private readonly Gatheshop.DAL.gift_card dal = new Gatheshop.DAL.gift_card();
                public gift_card()
        { }


                /// <summary>
                /// 逻辑删除一条giftcard数据
                /// </summary>
                public Boolean delete(string id)
                {
                   Boolean isSuccess= dal.deleteGiftCard(id);
                   return isSuccess;
                }
        /// <summary>
        /// 得到全部未被删除的列表
        /// </summary>
        /// <returns></returns>
                public DataTable getCardList()
                {
                   DataTable dt= dal.GetAllCard();
                    return dt;
                }

                public int getMaxCardNo()
                {

                    return dal.getMaxCardNo();
                }
                public Boolean addGiftCard(string cardNo, string cardPwd, int count, string createTime)
                {

                    return dal.addGiftCard(cardNo,cardPwd,count,createTime);
               
                }
                public Decimal getCardcount(string cardNo, string cardPwd)
                {
                    return dal.getCardCount( cardNo,  cardPwd);
                     
                }
                public Boolean setActive(string cardNo, string cardPwd, string owner)
                {
                    return dal.setActive(cardNo, cardPwd, owner);
                }
    }
}
